//
//  JuliyeNav.m
//  Zuisuigirveup
//
//  Created by spdbmacbook0003 on 2025/8/5.
//

#import "JuliyeNav.h"
#import <Masonry/Masonry.h>
@implementation JuliyeNav
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    [self juliyeInit];
    return self;
}
- (void)juliyeInit{
    UIButton *bbbtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [bbbtn setImage:[UIImage imageNamed:@"juliyeback"] forState:UIControlStateNormal];
    [bbbtn addTarget:self action:@selector(btnancskcacyion) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:bbbtn];
    
    UILabel *labb = [UILabel new];
    labb.font = [UIFont systemFontOfSize:16 weight:UIFontWeightBold];
    labb.textAlignment = NSTextAlignmentCenter;
    [self addSubview:labb];
    
    [bbbtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(25);
        make.left.mas_equalTo(20);
        make.height.mas_equalTo(20);
        make.bottom.mas_equalTo(-10);
    }];
    [labb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_greaterThanOrEqualTo(20);
        make.centerX.equalTo(self);
        make.centerY.equalTo(bbbtn);
    }];
}

- (void)btnancskcacyion{
    if(self.leftBtnBlock){
        self.leftBtnBlock();
    }
}
@end
